﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LibFriesland_Campina_CRM
{
    public class BizStockChecking
    {
        #region Thuoc tinh
        public long stock_checking_numid { get; set; }
        public string datetime_checking_str { get; set; }
        public DateTime datetime_checking { get { return Convert.ToDateTime(Thuvien.myConvertStringToLongDate(datetime_checking_str)); } }
        public string datetime_phone_checking_str { get; set; }
        public DateTime datetime_phone_checking { get { return Convert.ToDateTime(Thuvien.myConvertStringToLongDate(datetime_phone_checking_str)); } }
        public string by_na { get; set; }
        public string by_shop { get; set; }
        public string session_checking { get; set; }
        #endregion

        #region Ham thiet lap
        public BizStockChecking() { }
        public BizStockChecking(long pStock_checking_numid, string pDatetime_checking_str, string pDatetime_phone_checking_str, string pBy_na, string pBy_shop, string pSession_checking) 
        {
            stock_checking_numid = pStock_checking_numid;
            datetime_checking_str = pDatetime_checking_str;
            datetime_phone_checking_str = pDatetime_phone_checking_str;
            by_na = pBy_na;
            by_shop = pBy_shop;
            session_checking = pSession_checking;
        }
        #endregion

        #region Phuong thuc
        //Them phieu kiem kho
        public long addStockChecking()
        {
            return DalStockChecking.addStockChecking(this);
        }
        #endregion

        #region Dung cho Webservice
        //Them phieu kiem kho  boi NA
        public static int addStockCheckingbyNA(BizStockChecking pStockChecking, BizStockCheckingDetail pStockCheckingDetail)
        {
            return DalStockChecking.addStockCheckingbyNA(pStockChecking, pStockCheckingDetail);
        }
        #endregion
    }
}
